1. Technical Field
This invention relates to data processing systems, and in particular to the ability of an application program to access hardware devices in a fast and consistent manner.
2. Description of the Prior Art
Typical data processing systems (systems) support multiple application programs (applications) running at the same time. To accomplish this the processing systems have multiple layers that isolate the actual hardware from the applications. In a typical processing system one of the layers is the device driver which directly accesses the hardware device. The next layer is an operating system, such as AIX. This layer controls which application can access the device driver next. When an application interacts with a hardware device, the interactions must pass through these layers of the processing system. Each layer adds processing time and may even block usage of the hardware device to allow another application to use it.
Some systems allow all applications to access the hardware device directly whenever required. This is the way processing systems used to operate. However, the applications could only run one at a time. Typically, one application would run then when it completed, the next application would run. As systems became faster the execution of programs often had to wait for a hardware device to complete its operation before continuing. In order to improve the utilization of the entire system, multiple applications were run at the same time. This resulted in multiple applications trying to use the same hardware device, perhaps in different ways, at the same time. This led to the need to coordinate the hardware device usage between the applications and to protect themselves from each other. The coordination and programming effort became so large that this approach has been abandoned for general purpose processing systems that support multiple applications. It is still in use in special purpose processing systems that perform dedicated tasks such as control processors in automobiles or aircraft.
The problem of coordinating and protecting multiple applications led to contemporary general purpose systems. In these systems the hardware resources are owned by the system, and all interactions with the hardware devices go through the system. The system typically has multiple layers such as device drivers to directly access and control the hardware and an operating system to control the application access to the device drivers. The requirement to interact with a hardware device through these layers results in degraded performance for a single application using the hardware device.
In order to reduce this performance degradation, some systems grant an application restricted access to a hardware device. Access is restricted, in that the system remains involved in some portion of the hardware device operation so that it knows when another application needs the hardware. The system then requests that the application give up direct access to the hardware device. If the application does not give up access in a reasonable time, the system removes the hardware device from the application control and terminates the application.
Typical of this mode of operation is the use of virtual displays and input devices connected to a system. Each application thinks it has its own display and input device when in fact they are all sharing the same display and input devices. In normal text mode of keyboard operation and display, the extra processing time added by the system layers are not noticeable. However, when a pointing device such as a mouse and a graphical display are used, the extra overhead is noticed as a lag between moving the pointing device and movement on the display. To correct this, the application is given direct output access to the display so that it can be updated as quickly as possible. Access to the input devices is retained by the system. Therefore this portion of the operation is still degraded. This is done so that a user can request to switch the display from one application to the next. The system recognizes the user signal and transfers direct access to the display from one application to the other. This method of operation is acceptable for virtual displays because human hand movements are much slower than sight. However, for applications such as network communications, both the input and output devices must perform as quickly as possible. For application-to-application interactions through hardware, especially in the parallel processing environment, any degradation in the performance of the hardware interaction is unacceptable.